import {RequestModel} from '../models/requestModel.js'

class LoginModel extends RequestModel{
  getLogincode(){
    return this.getWxcode()
  }
  getOpenid(res){
    return this.requestGet({
      urlType: `ATKPay`,
      url: `toweixin.php?js_code=${res}&from=xcxgwcz1`
    })
  }
  getServerKey(reqData){
    return this.requestPost({
      urlType:'SNSTC',
      url:'sns/sso/v1/wxAppAuth',
      reqData:reqData,
      islogin: false
    })
  }
  getUserinfo(){
    return this.requestPost({
      urlType: 'MEMBERTK',
      url: 'member/v1/findMemberDetail',
      reqData: {},
      islogin: true
    })
  }
  getCardInfo(){
    return this.requestPost({
      urlType: 'SNSTC',
      url: 'sns/sso/v1/cardInfo',
      reqData: {},
      islogin: true
    })
  }
  refreshToken(reqData){
    return this.requestPost({
      urlType: 'SNSTC',
      url: 'sns/sso/v1/accessToken',
      reqData: reqData,
      islogin: true
    })
  }



}
export { LoginModel }

